import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CustomAppbarPreferredSize extends StatelessWidget
    implements PreferredSizeWidget {
  const CustomAppbarPreferredSize(this.child, {Key? key}) : super(key: key);
  final Widget child;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight),
      alignment: Alignment.center,
      color: Colors.white,
      child: child,
    );
  }

  @override
  Size get preferredSize => Size(ScreenUtil().scaleWidth, kToolbarHeight);
}
